gtk4.git
4 years agoMerge branch 'synthetic-motion-grab' into 'master'
Matthias Clasen [Fri, 23 Apr 2021 03:11:36 +0000 (03:11 +0000)]
Merge branch 'synthetic-motion-grab' into 'master'

gdk: Avoid synthetic motion confusion

Closes #3439

See merge request GNOME/gtk!3471

4 years agogdk: Avoid synthetic motion confusion
Matthias Clasen [Thu, 22 Apr 2021 23:51:17 +0000 (19:51 -0400)]
gdk: Avoid synthetic motion confusion

Don't emit a synthetic motion event on a surface
that is grab-shadowed by a popup. This has been
known to confuse GTK, at times.

Fixes: #3439
4 years agoMerge branch 'gtk4-listbox-selection' into 'master'
Matthias Clasen [Thu, 22 Apr 2021 23:29:45 +0000 (23:29 +0000)]
Merge branch 'gtk4-listbox-selection' into 'master'

Allow repeated selection extension on gtklistbox

Closes #3887

See merge request GNOME/gtk!3461

4 years agoMerge branch 'resize-borders' into 'master'
Matthias Clasen [Thu, 22 Apr 2021 11:13:20 +0000 (11:13 +0000)]
Merge branch 'resize-borders' into 'master'

window: Fix up resize borders

Closes #3856

See merge request GNOME/gtk!3467

4 years agoMerge branch 'a11y-debug' into 'master'
Matthias Clasen [Thu, 22 Apr 2021 11:04:30 +0000 (11:04 +0000)]
Merge branch 'a11y-debug' into 'master'

Some a11y improvements

See merge request GNOME/gtk!3455

4 years agoMerge branch 'gtk4-compose-modifiers' into 'master'
Matthias Clasen [Thu, 22 Apr 2021 10:58:24 +0000 (10:58 +0000)]
Merge branch 'gtk4-compose-modifiers' into 'master'

imcontextsimple: Ignore more modifiers in compose

See merge request GNOME/gtk!3468

4 years agoMerge branch 'wip/muktupavels/solid-csd' into 'master'
Matthias Clasen [Thu, 22 Apr 2021 10:48:22 +0000 (10:48 +0000)]
Merge branch 'wip/muktupavels/solid-csd' into 'master'

theme: fix solid-csd style

See merge request GNOME/gtk!3460

4 years agotheme: Make solid borders look better
Matthias Clasen [Thu, 22 Apr 2021 10:43:46 +0000 (06:43 -0400)]
theme: Make solid borders look better

As pointed out by Alberts Muktupāvels, without this,
we are missing the inner edge of the frame.

4 years agotheme: Fix solid-csd borders
Matthias Clasen [Thu, 22 Apr 2021 01:10:17 +0000 (21:10 -0400)]
theme: Fix solid-csd borders

The selectors did not apply anymore.
Based on a patch by Alberts Muktupāvels.

4 years agowindow: Make resize border size independent
Matthias Clasen [Thu, 22 Apr 2021 10:33:30 +0000 (06:33 -0400)]
window: Make resize border size independent

Deriving the resize border size from the shadows
carries the risk that we might end up with uneven
resize borders (or none at all, on some sides).

So, justs enforce that we have a big enough shadow
width on all sides.

4 years agoimcontextsimple: Ignore more modifiers in compose
Ulli Kehrle [Wed, 21 Apr 2021 23:50:35 +0000 (01:50 +0200)]
imcontextsimple: Ignore more modifiers in compose

Previously it was impossible to compose characters on higher levels of
some keyboard layouts as pressing the level selection key would just
exit compose mode.

Examples for affected keyboard layouts include the Latvian
apostrophe-variant "lv(apostrophe)" (latched third level), the extended
German keyboard layout "de(e1)" (latched fifth level) as well as the
multilingual Canadian keyboard layout "ca(multix)" and the German
neo-layout "de(neo)" and its descendants (shifted fifth level).

To reproduce, set a compose key and select the Latvian apostrophe layout.
Notice that you now can input [ by pressing first the ' and then the 8-key.
Then pressing <compose>'8'8 should produce ⟦, but prior to this patch it
did not.

4 years agowindow: Tweak resize borders
Matthias Clasen [Thu, 22 Apr 2021 01:09:09 +0000 (21:09 -0400)]
window: Tweak resize borders

Make windows resizable in the padding and border
area of the css box as well. This naturally makes
solid-csd borders work again.

4 years agowindow: Fix up resize borders
Matthias Clasen [Thu, 22 Apr 2021 00:00:49 +0000 (20:00 -0400)]
window: Fix up resize borders

The invisible resize borders have been wider than they
should, for a while. Go back to a size close to what
we have in GTK3.

To summarize: resize borders will be at most 12 pixels
on each size, but never wider than the windows shadow.
The resize corners have 'legs' of 24 pixels where you
still get a corner resize cursor.

Fixes: #3856
4 years agoAllow repeated selection extension on gktlistbox
John Renner [Tue, 20 Apr 2021 20:52:52 +0000 (13:52 -0700)]
Allow repeated selection extension on gktlistbox

4 years agoMerge branch 'im-cursor-pos' into 'master'
Matthias Clasen [Wed, 21 Apr 2021 17:43:12 +0000 (17:43 +0000)]
Merge branch 'im-cursor-pos' into 'master'

imcontext: Fix cursor positions

Closes #3885

See merge request GNOME/gtk!3464

4 years agoMerge branch 'wip/oholy/placesview-default-location-regression' into 'master'
Matthias Clasen [Wed, 21 Apr 2021 12:22:17 +0000 (12:22 +0000)]
Merge branch 'wip/oholy/placesview-default-location-regression' into 'master'

placesview: Open location even if mount was not found

Closes nautilus#1811

See merge request GNOME/gtk!3435

4 years agoa11y: Update the labelled-by relation of GtkTreeExpander
Emmanuele Bassi [Wed, 21 Apr 2021 10:43:16 +0000 (11:43 +0100)]
a11y: Update the labelled-by relation of GtkTreeExpander

Whenever we change the :child property, we need to update the
labelled-by relation.

4 years agoa11y: Set state on the GtkTreeExpander widget
Emmanuele Bassi [Wed, 21 Apr 2021 10:14:28 +0000 (11:14 +0100)]
a11y: Set state on the GtkTreeExpander widget

Instead of setting it on its internal child.

4 years agoimcontext: Fix cursor positions
Matthias Clasen [Wed, 21 Apr 2021 10:27:26 +0000 (06:27 -0400)]
imcontext: Fix cursor positions

gtk_im_context_get_preedit_string is documented to
return the cursor position as a character offset,
not a byte count. So return that.

Fixed: #3885

4 years agoMerge branch 'untrusted-beep' into 'master'
Matthias Clasen [Wed, 21 Apr 2021 10:12:39 +0000 (10:12 +0000)]
Merge branch 'untrusted-beep' into 'master'

x11: Don't beep on untrusted displays

Closes #3862

See merge request GNOME/gtk!3463

4 years agoa11y: Pair window:activate with window:deactivate signal
Emmanuele Bassi [Wed, 21 Apr 2021 09:20:04 +0000 (10:20 +0100)]
a11y: Pair window:activate with window:deactivate signal

Orca needs both events in order to decide whether or not to subscribe to
other event/state changes in a window.

4 years agox11: Don't beep on untrusted displays
Matthias Clasen [Wed, 21 Apr 2021 00:53:02 +0000 (20:53 -0400)]
x11: Don't beep on untrusted displays

This can trigger BadAccess, and we don't
want that.

Fixes: #3862
4 years agoa11y: Realize notebook tabs when switching
Matthias Clasen [Wed, 21 Apr 2021 00:35:22 +0000 (20:35 -0400)]
a11y: Realize notebook tabs when switching

We're not moving focus here, so we can't rely
on that to conjure the a11y objects into existence.

4 years agotheme: fix solid-csd style
Alberts Muktupāvels [Tue, 20 Apr 2021 19:02:10 +0000 (22:02 +0300)]
theme: fix solid-csd style

Move .solid-csd style out of .csd parent and adjust it so windows
look similar / same to GTK 3 windows:
- 4px padding.
- extra shadow.

https://gitlab.gnome.org/GNOME/gtk/-/issues/3879#note_1086351
https://gitlab.gnome.org/GNOME/gtk/-/issues/3879#note_1086377

4 years agoa11y: Avoid spurious selection changed events
Matthias Clasen [Tue, 20 Apr 2021 17:23:56 +0000 (13:23 -0400)]
a11y: Avoid spurious selection changed events

Only send selection-changed events when we either
had a non-empty selection before, or have one now.

This should help orca speak the right things, and
not the wrong things.

Related: #3549

4 years agoa11y: Emit window:activate event
Emmanuele Bassi [Tue, 20 Apr 2021 16:24:13 +0000 (17:24 +0100)]
a11y: Emit window:activate event

Orca uses the window:activate event type to track top levels, and avoid
being spammed by events coming from non-focused windows.

4 years agostackswitcher: Set accessible label properties
Matthias Clasen [Tue, 20 Apr 2021 02:11:55 +0000 (22:11 -0400)]
stackswitcher: Set accessible label properties

This makes the tabs in about dialogs come out as
'About', 'Credits', and 'System', instead of
'Tab', 'Tab', 'Tab'.

4 years agoa11y: Emit focus events
Matthias Clasen [Tue, 20 Apr 2021 01:29:17 +0000 (21:29 -0400)]
a11y: Emit focus events

Orca relies on these to keep track of the focus location,
ignoring the focused state. With this change, orca can
once again speak text in entries as I type.

4 years agoa11y: Make things appear on focus in
Matthias Clasen [Tue, 20 Apr 2021 00:39:32 +0000 (20:39 -0400)]
a11y: Make things appear on focus in

We are starting with a pretty empty a11y object tree,
and we want orca to bring more of it into existence
by navigating the tree. But that only happens when we
send it events. Primarily focus events, which come in
from GTK via the platform_change mechanism. So realize
the context when we are sending platform_changes,
otherwise, orca never gets the mesage.

4 years agoMerge branch 'fix-uri-crash' into 'master'
Matthias Clasen [Mon, 19 Apr 2021 21:09:44 +0000 (21:09 +0000)]
Merge branch 'fix-uri-crash' into 'master'

Fix a possible crash in gtk_show_uri

Closes #3883

See merge request GNOME/gtk!3457

4 years agoFix a possible crash in gtk_show_uri
Matthias Clasen [Mon, 19 Apr 2021 20:39:53 +0000 (16:39 -0400)]
Fix a possible crash in gtk_show_uri

g_file_get_basename can return NULL.
Deal with it somehow.

Fixes: #3883
4 years agoa11y: Actually set accessible roles
Matthias Clasen [Sat, 17 Apr 2021 23:02:53 +0000 (19:02 -0400)]
a11y: Actually set accessible roles

With most context realization happening inside
GtkAtspiContext in response to D-Bus calls, the
code in gtk_widget_realize_at_context that sets
the role is not executed for most accessibles,
causing them to be stuck with the 'filler' role
that makes orca ignore them.

To fix this, split gtk_widget_realize_at_context
into the actual context realization (getting on
the bus) and the setting of widget-specific
properties, and do the latter part when the
widget is rooted.

This makes accerciser report proper roles for
entries and buttons. Orca still has an issue
with getting the hierarchy populated.

4 years agoa11y: Track window states more closely
Matthias Clasen [Sat, 17 Apr 2021 19:23:04 +0000 (15:23 -0400)]
a11y: Track window states more closely

Orca ignores events unless the object is inside an object
with role window and states ACTIVE and SHOWING. To arrange
for this, introduce a new ACTIVE platform state, and set it
for windows when they are active.

This gets orca to be a lot more talkative.

4 years agoa11y: Add the root object to the cache
Matthias Clasen [Sat, 17 Apr 2021 19:21:41 +0000 (15:21 -0400)]
a11y: Add the root object to the cache

Not 100% sure this is necessary, but maybe it helps
to get orca up to speed.

4 years agoatspicontext: Remove an unused field
Matthias Clasen [Sat, 17 Apr 2021 18:12:28 +0000 (14:12 -0400)]
atspicontext: Remove an unused field

We don't make any use of the cache field, so drop it.

4 years agoMerge branch 'wip/exalm/shader' into 'master'
Matthias Clasen [Mon, 19 Apr 2021 18:01:44 +0000 (18:01 +0000)]
Merge branch 'wip/exalm/shader' into 'master'

gsk: Fix shader gresource paths

See merge request GNOME/gtk!3453

4 years agoUpdate Nepali translation
Pawan Chitrakar [Mon, 19 Apr 2021 16:00:12 +0000 (16:00 +0000)]
Update Nepali translation

(cherry picked from commit 2a8fd6a4880c6e484cb8be081dff32095033cf2a)

4 years agoUpdate Nepali translation
Pawan Chitrakar [Mon, 19 Apr 2021 15:57:37 +0000 (15:57 +0000)]
Update Nepali translation

(cherry picked from commit 4e243d7d121eac1743f4103ff8af8bc3caba0c99)

4 years agogsk: Fix shader gresource paths
Alexander Mikhaylenko [Mon, 19 Apr 2021 14:59:58 +0000 (19:59 +0500)]
gsk: Fix shader gresource paths

They were never updated after having been moved.

4 years agoUpdate Polish translation
Piotr Drąg [Sun, 18 Apr 2021 10:44:35 +0000 (12:44 +0200)]
Update Polish translation

4 years agoMerge branch 'gtksecurememory-updates' into 'master'
Emmanuele Bassi [Sat, 17 Apr 2021 23:46:38 +0000 (23:46 +0000)]
Merge branch 'gtksecurememory-updates' into 'master'

gtksecurememory: Request that secure memory not be dumped to disk

See merge request GNOME/gtk!3452

4 years agomeson: check for madvise()
Jason Francis [Sat, 17 Apr 2021 23:28:36 +0000 (19:28 -0400)]
meson: check for madvise()

4 years agogtksecurememory: Request that secure memory not be dumped to disk
Matthew Garrett [Fri, 19 Apr 2019 20:08:32 +0000 (13:08 -0700)]
gtksecurememory: Request that secure memory not be dumped to disk

Linux 3.4 added support for the MADV_DONTDUMP option to madvise(), which
requests that the covered memory not be included in coredumps. It makes
sense to use this to prevent cases where application crashes could
result in secrets being persisted to disk or included in dumps that are
uploaded to remote servers for analysis. I've avoided making this fatal
since there's a chance this code could be built on systems that have
MADV_DONTDUMP but run on systems that don't.

4 years agoMerge branch 'a11y-debug' into 'master'
Matthias Clasen [Sat, 17 Apr 2021 16:39:20 +0000 (16:39 +0000)]
Merge branch 'a11y-debug' into 'master'

testatcontext: Print out platform changes

See merge request GNOME/gtk!3451

4 years agoa11y: Add more debug spew
Matthias Clasen [Sat, 17 Apr 2021 15:59:04 +0000 (11:59 -0400)]
a11y: Add more debug spew

This is in an attempt to figure out why orca won't speak.

4 years agotestatcontext: Print out platform changes
Matthias Clasen [Sat, 17 Apr 2021 02:18:52 +0000 (22:18 -0400)]
testatcontext: Print out platform changes

This helps debugging what changes orca sees.

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 16 Apr 2021 23:51:10 +0000 (23:51 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

image, picture: Move pixbuf code to gdkpixbufutils

See merge request GNOME/gtk!3449

4 years agoplacesview: Fix server mount feedback
Matthias Clasen [Fri, 16 Apr 2021 23:34:24 +0000 (19:34 -0400)]
placesview: Fix server mount feedback

We weren't properly resetting the in-entry progress.

4 years agoplacesview: Fix mounting remote locations
Matthias Clasen [Fri, 16 Apr 2021 23:17:37 +0000 (19:17 -0400)]
placesview: Fix mounting remote locations

This was broken by a stupid copy-paste error.

4 years agomountoperation: Some cosmetics
Matthias Clasen [Fri, 16 Apr 2021 23:05:14 +0000 (19:05 -0400)]
mountoperation: Some cosmetics

Fix up the dialog minimally.

4 years agocssimageurl: Remove direct pixbuf use
Matthias Clasen [Fri, 16 Apr 2021 22:05:21 +0000 (18:05 -0400)]
cssimageurl: Remove direct pixbuf use

Rely on the gdkpixbufutils api that gives us
a paintable.

4 years agoimage, picture: Move pixbuf code to gdkpixbufutils
Matthias Clasen [Fri, 16 Apr 2021 21:17:26 +0000 (17:17 -0400)]
image, picture: Move pixbuf code to gdkpixbufutils

This cleans up and moves the code to load files
while taking the scale into account. Along the way,
we drop the last uses of GdkPixbufAnimation, and
consolidate the pixbuf using code in one place.

4 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 16 Apr 2021 15:16:48 +0000 (15:16 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

pixbufutils: Remove an unused function

See merge request GNOME/gtk!3447

4 years agoMerge branch 'wayland-xdg-surface-setup' into 'master'
Matthias Clasen [Fri, 16 Apr 2021 15:16:28 +0000 (15:16 +0000)]
Merge branch 'wayland-xdg-surface-setup' into 'master'

wayland: Don't duplicate xdg_surface setup code

See merge request GNOME/gtk!3191

4 years agoMerge branch 'wayland-parent-shadow-refactor' into 'master'
Jonas Ådahl [Fri, 16 Apr 2021 14:34:42 +0000 (14:34 +0000)]
Merge branch 'wayland-parent-shadow-refactor' into 'master'

wayland: Avoid directly accessing shadow property of parent surface

See merge request GNOME/gtk!3190

4 years agowayland: Don't duplicate xdg_surface setup code
David Keijser [Wed, 3 Feb 2021 21:09:11 +0000 (22:09 +0100)]
wayland: Don't duplicate xdg_surface setup code

4 years agowayland: Avoid directly accessing shadow property of parent surface
David Keijser [Sat, 30 Jan 2021 17:21:56 +0000 (18:21 +0100)]
wayland: Avoid directly accessing shadow property of parent surface

4 years agopixbufutils: Remove an unused function
Matthias Clasen [Fri, 16 Apr 2021 10:52:43 +0000 (06:52 -0400)]
pixbufutils: Remove an unused function

4 years agoMerge branch 'latest.glib.msvc' into 'master'
Matthias Clasen [Fri, 16 Apr 2021 12:25:43 +0000 (12:25 +0000)]
Merge branch 'latest.glib.msvc' into 'master'

Fix builds against latest stable GLib with MSVC

See merge request GNOME/gtk!3443

4 years agoMerge branch 'fix-focus-unsetting' into 'master'
Matthias Clasen [Fri, 16 Apr 2021 11:47:44 +0000 (11:47 +0000)]
Merge branch 'fix-focus-unsetting' into 'master'

window: Fix deferred focus unsetting

Closes #3413

See merge request GNOME/gtk!3446

4 years agowindow: Fix deferred focus unsetting
Matthias Clasen [Fri, 16 Apr 2021 11:26:32 +0000 (07:26 -0400)]
window: Fix deferred focus unsetting

In commit 4a76abffd4d62cbb, we deferred unsetting focus
and default until after the next draw, overlooking the
case where the focus is set to another widget before we
ever get to the unsetting.

Fixes: #3413
4 years agoGTK: Fix builds against latest stable GLib with MSVC
Chun-wei Fan [Fri, 16 Apr 2021 03:36:18 +0000 (11:36 +0800)]
GTK: Fix builds against latest stable GLib with MSVC

GLib-2.68.x now considers warning C4098 ('void' function returning a value) as
an error, so avoid doing that.

4 years agoGSK: Fix builds against latest stable GLib with MSVC
Chun-wei Fan [Fri, 16 Apr 2021 03:33:00 +0000 (11:33 +0800)]
GSK: Fix builds against latest stable GLib with MSVC

GLib-2.68.x now considers warning C4098 ('void' function returning a value) as
an error, so avoid doing that.

4 years agoGDK: Fix builds against latest stable GLib with MSVC
Chun-wei Fan [Fri, 16 Apr 2021 03:22:27 +0000 (11:22 +0800)]
GDK: Fix builds against latest stable GLib with MSVC

GLib-2.68.x now considers warning C4098 ('void' function returning a value) as
an error, so avoid doing that.

4 years agoMerge branch 'im-context-event-leak' into 'master'
Matthias Clasen [Thu, 15 Apr 2021 22:16:49 +0000 (22:16 +0000)]
Merge branch 'im-context-event-leak' into 'master'

imcontext: Eat key events during preedit

See merge request GNOME/gtk!3440

4 years agoMerge branch 'theme-fallback-fix' into 'master'
Matthias Clasen [Thu, 15 Apr 2021 21:31:09 +0000 (21:31 +0000)]
Merge branch 'theme-fallback-fix' into 'master'

themes: Make fallback work a bit better

See merge request GNOME/gtk!3441

4 years agothemes: Make fallback work a bit better
Matthias Clasen [Thu, 15 Apr 2021 21:08:15 +0000 (17:08 -0400)]
themes: Make fallback work a bit better

One case we did not include in fd329e0ec582d7562f444b is

Adwaita-dark -> Default:dark

It turns out that it is needed.

4 years agoimcontext: Eat key events during preedit
Matthias Clasen [Thu, 15 Apr 2021 20:59:02 +0000 (16:59 -0400)]
imcontext: Eat key events during preedit

Avoid passing through random key press or release
events while we are showing preedit. That prevents
'accidents' like typing Ctrl-. bringing up the
Emoji chooser during preedit, or hitting Ctrl-a
after the Compose key moving the 'dot' around in
vim in terminals.

4 years agoMerge branch 'demo-manpages' into 'master'
Matthias Clasen [Thu, 15 Apr 2021 11:15:24 +0000 (11:15 +0000)]
Merge branch 'demo-manpages' into 'master'

meson: only build demo manpages when demos are enabled

See merge request GNOME/gtk!3438

4 years agoMerge branch 'theme-icon-filter-fixes' into 'master'
Matthias Clasen [Thu, 15 Apr 2021 11:12:28 +0000 (11:12 +0000)]
Merge branch 'theme-icon-filter-fixes' into 'master'

theme: Use -gtk-icon-filter for full-color icons

See merge request GNOME/gtk!1990

4 years agotheme: Use -gtk-icon-filter for full-color icons
nana-4 [Sat, 30 May 2020 21:37:06 +0000 (06:37 +0900)]
theme: Use -gtk-icon-filter for full-color icons

Not for symbolic icons.

Don't apply `-gtk-icon-filter: opacity(0.5);` to the symbolic icons as
they already have the "gray" colors indicating the disabled state.
Symbolic icons can be styled using the `color` property.

Also remove the obsolete comment.

4 years agomeson: only build demo manpages when demos are enabled
Eli Schwartz [Wed, 14 Apr 2021 02:48:39 +0000 (22:48 -0400)]
meson: only build demo manpages when demos are enabled

Installing them even when manpages are enabled, but the demos are
disabled, produces manpages for unavailable programs...

4 years agoMerge branch 'x11-quiet-exit' into 'master'
Matthias Clasen [Wed, 14 Apr 2021 00:32:05 +0000 (00:32 +0000)]
Merge branch 'x11-quiet-exit' into 'master'

x11: Be quiet on exit by default

See merge request GNOME/gtk!3436

4 years agoMerge branch 'ngl-crash' into 'master'
Matthias Clasen [Tue, 13 Apr 2021 22:02:44 +0000 (22:02 +0000)]
Merge branch 'ngl-crash' into 'master'

ngl: Fix a rare assertion violation

Closes #3853

See merge request GNOME/gtk!3434

4 years agox11: Be quiet on exit by default
Matthias Clasen [Tue, 13 Apr 2021 18:52:09 +0000 (14:52 -0400)]
x11: Be quiet on exit by default

The condition we check for to catch X servers going away
may not be accurate anymore, and the warning shows up in
logs, causing customers to be concerned. So, be quiet by
default, unless the user explicitly asked for a message.

4 years agoplacesview: Open location even if mount was not found
Ondrej Holy [Tue, 13 Apr 2021 13:55:19 +0000 (15:55 +0200)]
placesview: Open location even if mount was not found

Some locations have to be mounted, but their mounts are not user-visible
(e.g. smb-browse). Though this is maybe a bit weird, it is how it works
for years. The problem is that the commit 267ea755, which tries to get the
default location for opening, caused regression as it doesn't expect such
possibility. Before this commit, such locations were opened without any
issue, but nothing happens currently after clicking to "Connect" except of
clearing the "Connect to Server" entry. Let's fallback to the original
location if the mount was not found to fix this regression.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1811
4 years agoMerge branch 'flatpak-highlight' into 'master'
Matthias Clasen [Tue, 13 Apr 2021 11:38:45 +0000 (11:38 +0000)]
Merge branch 'flatpak-highlight' into 'master'

flatpak: Include highlight in gtk4-demo flatpak

Closes #3867

See merge request GNOME/gtk!3433

4 years agoflatpak: Include highlight in gtk4-demo flatpak
Matthias Clasen [Tue, 13 Apr 2021 03:53:52 +0000 (23:53 -0400)]
flatpak: Include highlight in gtk4-demo flatpak

Include the highlight utility to make syntax
highlighting work in gtk4-demo. This requires
building its dependencies as well, boost and lua.

4 years agongl: Fix a rare assertion violation
Matthias Clasen [Tue, 13 Apr 2021 02:51:01 +0000 (22:51 -0400)]
ngl: Fix a rare assertion violation

When we clean up the uniform allocations after a frame,
it can happen that our space requirements actually increase,
due to padding that depends on the order of allocations.

Instead of asserting that it doesn't happen, just make
it work by growing our allocation.

Fixes: #3853
4 years agoMerge branch 'testsuite-asserts' into 'master'
Matthias Clasen [Tue, 13 Apr 2021 02:46:07 +0000 (02:46 +0000)]
Merge branch 'testsuite-asserts' into 'master'

testsuite: Reduce the use of g_assert

Closes #3864

See merge request GNOME/gtk!3432

4 years agobuild: Quiet the compiler
Matthias Clasen [Tue, 13 Apr 2021 02:11:05 +0000 (22:11 -0400)]
build: Quiet the compiler

Don't use -Wnull-dereference when assertions are
disabled, since that causes the compiler to see
NULL everywhere.

4 years agowayland: Build with G_DISABLE_ASSERT
Emmanuele Bassi [Mon, 12 Apr 2021 10:59:56 +0000 (11:59 +0100)]
wayland: Build with G_DISABLE_ASSERT

4 years agobuild: Don't append multiple flags as a string
Emmanuele Bassi [Mon, 12 Apr 2021 10:29:24 +0000 (11:29 +0100)]
build: Don't append multiple flags as a string

The gtk_debug_cflags variable is an array, with each argument stored in
a separate string; if we add multiple arguments inside the same string
we break the escaping rules.

Fixes: #3864
4 years agogsk/ngl: Build with G_DISABLE_ASSERT enabled
Emmanuele Bassi [Mon, 12 Apr 2021 11:27:55 +0000 (12:27 +0100)]
gsk/ngl: Build with G_DISABLE_ASSERT enabled

4 years agoForce g_test_init to cooperate
Matthias Clasen [Tue, 13 Apr 2021 01:22:04 +0000 (21:22 -0400)]
Force g_test_init to cooperate

Change all g_test_init calls in the testsuite
to avoid the macro, so they work regardless of
G_DISABLE_ASSERT.

4 years agoMake gtk_test_init work without assertions
Matthias Clasen [Tue, 13 Apr 2021 00:57:02 +0000 (20:57 -0400)]
Make gtk_test_init work without assertions

The g_test_init macro 'helpfully' refuses to work when
assertions are disabled. So we just use the function.

4 years agoRemove assertions in tests
Matthias Clasen [Tue, 13 Apr 2021 00:56:46 +0000 (20:56 -0400)]
Remove assertions in tests

4 years agoInspector: Fix a possible undefined use
Matthias Clasen [Tue, 13 Apr 2021 00:56:19 +0000 (20:56 -0400)]
Inspector: Fix a possible undefined use

4 years agoFix unused variable warnings
Matthias Clasen [Tue, 13 Apr 2021 00:55:01 +0000 (20:55 -0400)]
Fix unused variable warnings

These happen for variables which are only used
in assertions, when assertions are disabled.

4 years agogtk-demo: Avoid compiler warnings without assertions
Matthias Clasen [Mon, 12 Apr 2021 21:12:01 +0000 (17:12 -0400)]
gtk-demo: Avoid compiler warnings without assertions

Avoid an unused variable warning.

4 years agogsk: Avoid compiler warnings without assertions
Matthias Clasen [Mon, 12 Apr 2021 21:08:33 +0000 (17:08 -0400)]
gsk: Avoid compiler warnings without assertions

Disabling assertions was provoking some unused variable
warnings from the compiler. Avoid these.

4 years agotestsuite: Reduce the use of g_assert
Matthias Clasen [Mon, 12 Apr 2021 20:12:25 +0000 (16:12 -0400)]
testsuite: Reduce the use of g_assert

Stop using g_assert() in the gtk tests.

4 years agotestsuite: Reduce the use of g_assert
Matthias Clasen [Mon, 12 Apr 2021 19:30:29 +0000 (15:30 -0400)]
testsuite: Reduce the use of g_assert

Stop using g_assert() in the gsk tests.

4 years agoMerge branch 'f16c.msvc' into 'master'
Matthias Clasen [Mon, 12 Apr 2021 20:35:10 +0000 (20:35 +0000)]
Merge branch 'f16c.msvc' into 'master'

Fix F16C build/runtime detection on Visual Studio

See merge request GNOME/gtk!3429

4 years agoMerge branch 'testsuite-asserts' into 'master'
Matthias Clasen [Mon, 12 Apr 2021 12:47:09 +0000 (12:47 +0000)]
Merge branch 'testsuite-asserts' into 'master'

testsuite: Reduce use of g_assert

See merge request GNOME/gtk!3431

4 years agotestsuite: Reduce use of g_assert
Matthias Clasen [Mon, 12 Apr 2021 12:33:41 +0000 (08:33 -0400)]
testsuite: Reduce use of g_assert

Stop using g_assert() in the css tests.

4 years agotestsuite: Reduce use of g_assert
Matthias Clasen [Mon, 12 Apr 2021 12:30:56 +0000 (08:30 -0400)]
testsuite: Reduce use of g_assert

Stop using g_assert() in the reftests.

4 years agotestsuite: Reduce use of g_assert
Matthias Clasen [Mon, 12 Apr 2021 12:16:45 +0000 (08:16 -0400)]
testsuite: Reduce use of g_assert

Stop using g_assert() in the gdk tests.

4 years agomeson.build: Check for F16C on 32-bit Visual Studio
Chun-wei Fan [Mon, 12 Apr 2021 09:58:46 +0000 (17:58 +0800)]
meson.build: Check for F16C on 32-bit Visual Studio

It is also possible to enable F16C instructions on 32-bit Visual Studio builds,
so also check for the compiler's ability to build F16C code on Visual Studio
32-bit instead of just bailing out.

4 years agogsk/ngl/fp16.c: Implement runtime F16C detection on MSVC
Chun-wei Fan [Mon, 12 Apr 2021 08:48:15 +0000 (16:48 +0800)]
gsk/ngl/fp16.c: Implement runtime F16C detection on MSVC

We need to use __cpuid() to check for the presence of F16C instructions on
Visual Studio builds, and call the half_to_float4() or float_to_half4()
implementation accordingly, as the __builtin_cpu...() functions are strictly
for GCC or CLang only.

Also, since __m128i_u is not a standard intrisics type across the board, just
use __m128i on Visual Studio as it is safe to do so there for use for
_mm_loadl_epi64().

Like running on Darwin, we cannot use the alias __attribute__ as __attribute__
is also for GCC and CLang only.